Integrand size = 10, antiderivative size = 54 \[ \int x \cosh \left ((a+b x)^2\right ) \, dx=-\frac {a \sqrt {\pi } \text {erf}(a+b x)}{4 b^2}-\frac {a \sqrt {\pi } \text {erfi}(a+b x)}{4 b^2}+\frac {\sinh \left ((a+b x)^2\right )}{2 b^2} \]
[Out]
Time = 0.04 (sec) , antiderivative size = 54, normalized size of antiderivative = 1.00, number of steps used = 8, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.700, Rules used = {5473, 6874, 5407, 2235, 2236, 5429, 2717} \[ \int x \cosh \left ((a+b x)^2\right ) \, dx=-\frac {\sqrt {\pi } a \text {erf}(a+b x)}{4 b^2}-\frac {\sqrt {\pi } a \text {erfi}(a+b x)}{4 b^2}+\frac {\sinh \left ((a+b x)^2\right )}{2 b^2} \]
[In]
[Out]
Rule 2235
Rule 2236
Rule 2717
Rule 5407
Rule 5429
Rule 5473
Rule 6874
Rubi steps \begin{align*} \text {integral}& = \frac {\text {Subst}\left (\int (-a+x) \cosh \left (x^2\right ) \, dx,x,a+b x\right )}{b^2} \\ & = \frac {\text {Subst}\left (\int \left (-a \cosh \left (x^2\right )+x \cosh \left (x^2\right )\right ) \, dx,x,a+b x\right )}{b^2} \\ & = \frac {\text {Subst}\left (\int x \cosh \left (x^2\right ) \, dx,x,a+b x\right )}{b^2}-\frac {a \text {Subst}\left (\int \cosh \left (x^2\right ) \, dx,x,a+b x\right )}{b^2} \\ & = \frac {\text {Subst}\left (\int \cosh (x) \, dx,x,(a+b x)^2\right )}{2 b^2}-\frac {a \text {Subst}\left (\int e^{-x^2} \, dx,x,a+b x\right )}{2 b^2}-\frac {a \text {Subst}\left (\int e^{x^2} \, dx,x,a+b x\right )}{2 b^2} \\ & = -\frac {a \sqrt {\pi } \text {erf}(a+b x)}{4 b^2}-\frac {a \sqrt {\pi } \text {erfi}(a+b x)}{4 b^2}+\frac {\sinh \left ((a+b x)^2\right )}{2 b^2} \\ \end{align*}
Time = 0.03 (sec) , antiderivative size = 39, normalized size of antiderivative = 0.72 \[ \int x \cosh \left ((a+b x)^2\right ) \, dx=\frac {-a \sqrt {\pi } (\text {erf}(a+b x)+\text {erfi}(a+b x))+2 \sinh \left ((a+b x)^2\right )}{4 b^2} \]
[In]
[Out]
Result contains complex when optimal does not.
Time = 0.05 (sec) , antiderivative size = 66, normalized size of antiderivative = 1.22
method | result | size |
risch | \(-\frac {{\mathrm e}^{-\left (b x +a \right )^{2}}}{4 b^{2}}-\frac {a \,\operatorname {erf}\left (b x +a \right ) \sqrt {\pi }}{4 b^{2}}+\frac {{\mathrm e}^{\left (b x +a \right )^{2}}}{4 b^{2}}+\frac {i a \sqrt {\pi }\, \operatorname {erf}\left (i x b +i a \right )}{4 b^{2}}\) | \(66\) |
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 261 vs. \(2 (44) = 88\).
Time = 0.26 (sec) , antiderivative size = 261, normalized size of antiderivative = 4.83 \[ \int x \cosh \left ((a+b x)^2\right ) \, dx=\frac {b \cosh \left (b^{2} x^{2} + 2 \, a b x + a^{2}\right )^{2} + \sqrt {\pi } \sqrt {-b^{2}} {\left (a \cosh \left (b^{2} x^{2} + 2 \, a b x + a^{2}\right ) + a \sinh \left (b^{2} x^{2} + 2 \, a b x + a^{2}\right )\right )} \operatorname {erf}\left (\frac {\sqrt {-b^{2}} {\left (b x + a\right )}}{b}\right ) - \sqrt {\pi } \sqrt {b^{2}} {\left (a \cosh \left (b^{2} x^{2} + 2 \, a b x + a^{2}\right ) + a \sinh \left (b^{2} x^{2} + 2 \, a b x + a^{2}\right )\right )} \operatorname {erf}\left (\frac {\sqrt {b^{2}} {\left (b x + a\right )}}{b}\right ) + 2 \, b \cosh \left (b^{2} x^{2} + 2 \, a b x + a^{2}\right ) \sinh \left (b^{2} x^{2} + 2 \, a b x + a^{2}\right ) + b \sinh \left (b^{2} x^{2} + 2 \, a b x + a^{2}\right )^{2} - b}{4 \, {\left (b^{3} \cosh \left (b^{2} x^{2} + 2 \, a b x + a^{2}\right ) + b^{3} \sinh \left (b^{2} x^{2} + 2 \, a b x + a^{2}\right )\right )}} \]
[In]
[Out]
\[ \int x \cosh \left ((a+b x)^2\right ) \, dx=\int x \cosh {\left (a^{2} + 2 a b x + b^{2} x^{2} \right )}\, dx \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 650 vs. \(2 (44) = 88\).
Time = 0.40 (sec) , antiderivative size = 650, normalized size of antiderivative = 12.04 \[ \int x \cosh \left ((a+b x)^2\right ) \, dx=\frac {1}{2} \, x^{2} \cosh \left ({\left (b x + a\right )}^{2}\right ) - \frac {1}{4} \, {\left (\frac {{\left (\frac {\sqrt {\pi } {\left (b^{2} x + a b\right )} a^{2} b^{3} {\left (\operatorname {erf}\left (\frac {\sqrt {{\left (b^{2} x + a b\right )}^{2}}}{b}\right ) - 1\right )}}{\sqrt {{\left (b^{2} x + a b\right )}^{2}} \left (-b^{2}\right )^{\frac {5}{2}}} - \frac {{\left (b^{2} x + a b\right )}^{3} b^{3} \Gamma \left (\frac {3}{2}, \frac {{\left (b^{2} x + a b\right )}^{2}}{b^{2}}\right )}{{\left ({\left (b^{2} x + a b\right )}^{2}\right )}^{\frac {3}{2}} \left (-b^{2}\right )^{\frac {5}{2}}} + \frac {2 \, a b^{3} e^{\left (-\frac {{\left (b^{2} x + a b\right )}^{2}}{b^{2}}\right )}}{\left (-b^{2}\right )^{\frac {5}{2}}}\right )} a}{\sqrt {-b^{2}}} + \frac {{\left (\frac {\sqrt {\pi } {\left (b^{2} x + a b\right )} a^{3} b^{4} {\left (\operatorname {erf}\left (\frac {\sqrt {{\left (b^{2} x + a b\right )}^{2}}}{b}\right ) - 1\right )}}{\sqrt {{\left (b^{2} x + a b\right )}^{2}} \left (-b^{2}\right )^{\frac {7}{2}}} - \frac {3 \, {\left (b^{2} x + a b\right )}^{3} a b^{4} \Gamma \left (\frac {3}{2}, \frac {{\left (b^{2} x + a b\right )}^{2}}{b^{2}}\right )}{{\left ({\left (b^{2} x + a b\right )}^{2}\right )}^{\frac {3}{2}} \left (-b^{2}\right )^{\frac {7}{2}}} + \frac {3 \, a^{2} b^{4} e^{\left (-\frac {{\left (b^{2} x + a b\right )}^{2}}{b^{2}}\right )}}{\left (-b^{2}\right )^{\frac {7}{2}}} + \frac {b^{4} \Gamma \left (2, \frac {{\left (b^{2} x + a b\right )}^{2}}{b^{2}}\right )}{\left (-b^{2}\right )^{\frac {7}{2}}}\right )} b}{\sqrt {-b^{2}}} + \frac {a {\left (\frac {\sqrt {\pi } {\left (b^{2} x + a b\right )} a^{2} {\left (\operatorname {erf}\left (\sqrt {-\frac {{\left (b^{2} x + a b\right )}^{2}}{b^{2}}}\right ) - 1\right )}}{b^{3} \sqrt {-\frac {{\left (b^{2} x + a b\right )}^{2}}{b^{2}}}} - \frac {2 \, a e^{\left (\frac {{\left (b^{2} x + a b\right )}^{2}}{b^{2}}\right )}}{b^{2}} - \frac {{\left (b^{2} x + a b\right )}^{3} \Gamma \left (\frac {3}{2}, -\frac {{\left (b^{2} x + a b\right )}^{2}}{b^{2}}\right )}{b^{5} \left (-\frac {{\left (b^{2} x + a b\right )}^{2}}{b^{2}}\right )^{\frac {3}{2}}}\right )}}{b} - \frac {\sqrt {\pi } {\left (b^{2} x + a b\right )} a^{3} {\left (\operatorname {erf}\left (\sqrt {-\frac {{\left (b^{2} x + a b\right )}^{2}}{b^{2}}}\right ) - 1\right )}}{b^{4} \sqrt {-\frac {{\left (b^{2} x + a b\right )}^{2}}{b^{2}}}} + \frac {3 \, a^{2} e^{\left (\frac {{\left (b^{2} x + a b\right )}^{2}}{b^{2}}\right )}}{b^{3}} - \frac {\Gamma \left (2, -\frac {{\left (b^{2} x + a b\right )}^{2}}{b^{2}}\right )}{b^{3}} + \frac {3 \, {\left (b^{2} x + a b\right )}^{3} a \Gamma \left (\frac {3}{2}, -\frac {{\left (b^{2} x + a b\right )}^{2}}{b^{2}}\right )}{b^{6} \left (-\frac {{\left (b^{2} x + a b\right )}^{2}}{b^{2}}\right )^{\frac {3}{2}}}\right )} b \]
[In]
[Out]
Result contains complex when optimal does not.
Time = 0.27 (sec) , antiderivative size = 99, normalized size of antiderivative = 1.83 \[ \int x \cosh \left ((a+b x)^2\right ) \, dx=-\frac {-\frac {i \, \sqrt {\pi } a \operatorname {erf}\left (i \, b {\left (x + \frac {a}{b}\right )}\right )}{b} - \frac {e^{\left (b^{2} x^{2} + 2 \, a b x + a^{2}\right )}}{b}}{4 \, b} + \frac {\frac {\sqrt {\pi } a \operatorname {erf}\left (-b {\left (x + \frac {a}{b}\right )}\right )}{b} - \frac {e^{\left (-b^{2} x^{2} - 2 \, a b x - a^{2}\right )}}{b}}{4 \, b} \]
[In]
[Out]
Timed out. \[ \int x \cosh \left ((a+b x)^2\right ) \, dx=\int x\,\mathrm {cosh}\left ({\left (a+b\,x\right )}^2\right ) \,d x \]
[In]
[Out]